package com.zhu.edu.service;

import com.zhu.edu.entity.Course;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zjc
 * @since 2021-12-21
 */
public interface CourseService extends IService<Course> {
    Map<String, Object> getThisCourses(Integer userId, Integer pageNum, Integer pageSize);

    //判断课程是否冲突
    boolean isContradict(Integer userId, Integer courseId);

    // 选课
    int chooseCourse(Integer userId, Integer courseId);

    //选课结果
    Map<String, Object> getChooseCourseResult(Integer userId, Integer pageNum, Integer pageSize);

    // 退课
    int deleteChooseCourse(Integer userId, Integer courseId);

    // 查看历史课程
    Map<String, Object> getHistoryCourses(Integer userId, Integer pageNum, Integer pageSize);

    // 查看本学期成绩
    Map<String, Object> getThisGrade(Integer userId, Integer first, Integer second);

    // 查看历史成绩
    Map<String, Object> getHistoryGrade(Integer userId, Integer term, Integer pageNum, Integer pageSize);

    Map<String, Object> getHistoryStartCourses(Integer userId, Integer term, Integer first, Integer second);

    Map<String, Object> getThisStartCourses(Integer userId, Integer first, Integer second);

    Map<String, Object> getALLStartCourses(Integer schoolId, Integer term, Integer first, Integer second);

    void closeChooseCourse();

    void openChooseCourse();
}
